package packets.s2cpackets;

import packets.SPacket;

/**
 * This packet is sent by the server to notify the client to initialize or unload
 * a column of chunks. The client is expected to allocate space for a full column
 * (currently 16 x 256 x 16 blocks). One or more 0x33 packets will follow, specifying
 * actual data to fill the chunk with.
 * 
 * Whenever you send this packet the client will clear any previous column at that
 * spot if one has previously been sent.  
 *
 */
public class S0x32 extends SPacket {
	/**
	 * 
	 * @param x X of the column to load/unload.
	 * @param z Z of the column to load/unload.
	 * @param initialize True iff the column needs to be initialized, false if the column needs to be unloaded.
	 */
	public S0x32(int x, int z, boolean initialize) {
		super(0x32);
		
		addInt(x);	// X
		addInt(z);	// Z
		
		if(initialize) {
			add((byte) 0x01);	//INITIALIZE
		} else {
			add((byte) 0x00);	//UNLOAD
		}
		
		
	}
}
